package cn.mandifal.manager.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;

/**
 * 登陆者的 Controller
 * @author ws
 */
@RestController
@RequestMapping("/adminLoginController")
public class AdminLoginController {

    @RequestMapping("/loginAndInfomation")
    public Map loginAndInfomation(){
        Map map=new HashMap();
        String name= SecurityContextHolder.getContext().getAuthentication().getName();
        map.put("loginName",name);
        return map;
    }
}
